"""覆盖设置"""
env = 'dev'
# env = 'prod'

if env == 'dev':
    ALLOWED_HOSTS = ['*']

    DEBUG = True

    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            'NAME': 'omall_dev',
            'USER': 'root',
            'PASSWORD': '123456',
            'HOST': '127.0.0.1',
            'PORT': '3306',
            'OPTIONS': {
                "init_command": "SET foreign_key_checks = 0;",
            },
            'env': 'dev'
        }
    }
elif env == 'prod':
    """覆盖设置"""
    ALLOWED_HOSTS = ['127.0.0.1']

    DEBUG = False

    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            'NAME': 'zjyh_prod',
            'USER': 'zjyh_prod',
            'PASSWORD': 'dF4sAMbnTsiCjRsW',
            'HOST': '121.43.190.149',
            'PORT': '3306',
            'OPTIONS': {
                "init_command": "SET foreign_key_checks = 0;",
            },
            'env': 'prod'
        }
    }